home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
Demos
/
Bombardier_PC
/
BSCRIPTS.CST
/
00011_Script_hendlers
< prev
next >
Wrap
Text File
|
1999-04-25
|
9KB
|
350 lines
-- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
-- Developed for Bombardier, Inc.
--
-- All programming developed by:
-- Robert Fabricant, Valerie Valoueva, Ossi Shaked,
-- Henry Sauvageot, Chris Howell & Chris Girand
--
-- Use of this code by parties other than @radical.media, inc. or their
--agents
-- without the express written consent of @radical.media, inc. AND Concurrent
-- New Media Group, L.L.C. is strictly prohibited.
------------------------------------------------------
global gMstones,gMSIndex,gMSpos
global gRtrnPln
-----------------------------------------------------------
-- qtvr handlers
--Check out script 2 in internal-scripts of "CH604.dir" movie
--for details on how QTVR exit frame script works
-------------------------------------------------------------
on openextra
--
end
on openextra2
global gQTVRObj,oldIndex,hotspot
set oldIndex = 0
set hotspot ="no"
QTVREnter(xtra "QTVRXtra")
-- create an object from the QTVR XTRA
set gQTVRObj = new(xtra "QTVRXtra")
end
on closemovie
if IsQTVRMovie(gQTVRObj) then QTVRClose(gQTVRObj)
put "closeM"
end
on openmovie Movie,mode
global gQTVRObj
set QTVRRect = rectToStr(the rect of sprite 6)
if IsQTVRMovie(gQTVRObj) then
--QTVRClose(gQTVRObj)
else
put "movie open"
QTVROpen(gQTVRObj,Movie, QTVRRect,mode)
if the result contains "Error" then
if the runmode = "author" then alert the result
end if
if QTVRgetQTVRType(gQTVRObj)="QTVRPanorama" then SetCallBacks
end if
end
on closeextra2
global gQTVRObj
put gQTVRObj, "close"
if IsQTVRMovie(gQTVRObj) then QTVRClose(gQTVRObj)
QTVRExit(xtra "QTVRXtra")
end
on closeextra
--
end
on rectToStr myRect
set myString = string(myRect)
delete char 1 to 5 of myString
delete char (the length of myString) of myString
return myString
end
on pointToStr myPoint
set myString = string(myPoint)
delete char 1 to 6 of myString
delete char (the length of myString) of myString
return myString
end
--------------------------------------------------------
-- ExtractPathName
-- pFileName is the full file path of the file
-- Returns the path component of pFileName
--
-- Extracts and returns the path component of a file specifier.
----------------------------------------------------------------
on ExtractPathName pPathName
put ":" into tDelimiter
if pPathName contains tDelimiter then
put length(pPathName) into tCharPos
repeat while tCharPos >= 1
if char tCharPos of pPathName = tDelimiter then return char 1 to tCharPos - 1 of pPathName
put tCharPos - 1 into tCharPos
end repeat
return empty
else
return empty
end if
end
on setCallbacks
global gQTVRObj
QTVRSetRollOverHotSpotHandler (gQTVRObj,"rolloverHS")
QTVRSetMouseOverHandler (gQTVRObj,empty)
QTVRSetMouseDownHandler (gQTVRObj,empty)
QTVRSetMouseStillDownHandler (gQTVRObj,empty)
QTVRSetPanZoomStartHandler (gQTVRObj,empty)
QTVRSetNodeLeaveHandler (gQTVRObj,empty)
end
on getQTVRParams
put QTVRgetNodeID(gQTVRObj) into nID
put QTVRgetPanAngle(gQTVRObj) into panAngle
put QTVRgetFOV(gQTVRObj) into FOV
put QTVRgetTiltAngle(gQTVRObj) into tiltAngle
return [nId, panAngle, FoV, tiltAngle]
end
on resetCallbackCheckboxes
set the hilite of member "MouseOverHandler Check" = false
set the hilite of member "RolloverHotSpotHandler Check" = false
set the hilite of member "MouseDownHandler Check" = false
set the hilite of member "PanZoomStartHandler Check" = false
set the hilite of member "MouseStillDownHandler Check" = false
set the hilite of member "NodeLeaveHandler Check" = false
end
on rolloverHS hotspotID
global gQTVRObj,gBlankRO, cockpitController
-- QTVRUpdate(gQTVRObj)
set nodeID = QTVRGetnodeID(gQTVRObj)
put hotspotID&&"rollover"&&nodeID
if hotspotID <>0 then
set converter = (integer(hotspotID) * 100) + integer(nodeID)
set name = "qtvr-"&(string(converter))
set the member of sprite 10 = name
repeat while soundBusy(3)
end repeat
puppetsound 3,"qtvrroll"&random(5)
else
set the castnum of sprite 10 to gBlankRO
end if
updateStage
end
on rolloverM
end
on mousedownM
put "mousedownM"
end
on mouseSdownM
put "mouseSdownM"
end
on PanZoom
put "PanZoom"
end
on NodeLeave
put "NodeLeave"
end
on getview
global gPan,gFov,gTilt,gQTVRObj,gNodeId
put QTVRgetNodeID(gQTVRObj) into gNodeId
put QTVRgetPanAngle(gQTVRObj) into gPan
put QTVRgetFOV(gQTVRObj) into gFov
put QTVRgetTiltAngle(gQTVRObj) into gTilt
put gPan&&gFov&&gTilt
end
on SetPanoNode nodeID, pUpdate, pQuality
global gQTVRObj
if IsQTVRMovie(gQTVRObj) then
-- we'll just set the ID to 5 for now
QTVRSetNodeID(gQTVRObj, 5)
QTVRUpdate(gQTVRObj)
end if
end
on SetMovieView pPan, pTilt, pFOV, pQuality
global gQTVRInstance
if IsQTVRMovie(gQTVRInstance) then
-- in QTVR 1.0 objects can't zoom:
if QTVRGetQTVRType(gQTVRInstance) = "QTVRPanorama" then QTVRSetFOV(gQTVRInstance,pFOV)
QTVRSetTiltAngle(gQTVRInstance,pTilt)
QTVRSetPanAngle(gQTVRInstance,pPan)
if not voidP(pQuality) then QTVRSetQuality(gQTVRInstance, pQuality)
QTVRUpdate(gQTVRInstance)
end if
end
-----------------------------------------
----- General Handlers
-----------------------------------------
on puppetoff
puppetsprite 2, false
repeat with i=24 to 28
puppetsprite i, false
end repeat
end
on ResetInfo
global gInfoSprt,gIImage
if gInfoSprt<>"" then
set the castnum of sprite gInfoSprt to the castnum of sprite gInfoSprt -2
end if
set gInfoSprt=""
set gIImage=""
updatestage
end
on ResetTour
global gSelct,gImage,gTourCast, NumOfQTVRMenuItems
set gSelct=""
set gImage=""
set qtvrPlaneSprNum = getSpriteNumFromMemberName("qtvranchor")+1
set range = NumOfQTVRMenuItems - 1
repeat with i=qtvrPlaneSprNum to qtvrPlaneSprNum+range
puppetSprite i, false
set the visible of sprite i to false
end repeat
end
on resetSubMENUs
repeat with i=11 to 15
puppetSprite i, False
end repeat
end
on getSpriteNumFromMemberName memberName
repeat with spriteNum = 1 to 120
if the memberNum of sprite spriteNum <> 0 then --if there is a sprite in channel
set M = the member of sprite spriteNum
if the name of member M = memberName then
return spriteNum
exit
end if
end if
end repeat
return 0
end
on getNumOfSprInCluster anchorSpriteName
set value = 0
set anchorSpriteNumber = getSpriteNumFromMemberName(anchorSpriteName)
repeat with spriteNum = anchorSpriteNumber+1 to 120
if the memberNum of sprite spriteNum <> 0 then
set value = value +1
else
return value
exit
end if
end repeat
return value
end
on setmovieMenuPuppets TrueOrFalse
set startSprNum = getSpriteNumFromMemberName ("anchor")+1
set range = getNumOfSprInCluster("anchor")-1
repeat with spriteNum=startSprNum to startSprNum+range
puppetSprite spriteNum, TrueOrFalse
end repeat
end
on switchMovie marker
-- set markerList = [#global:"gx",#se:"se",#ch604:"604",#lear60:"60",¼
-- #lear45:"45",#lear31a:"31a",#customer:"cs",#business:"bjs"]
-- set movieName = symbol(marker)
-- set soundSuffix = getaProp(markerList,movieName)
-- puppetsound 3, "mousemulti_"&soundSuffix
-- closeMovie
-- clearpups
-- setmovieMenuPuppets false
-- go to marker
end
on checkSound
global gselct
if gselct = 102 then
if not soundbusy(2) then
sound stop 1
puppetsound 2, "qtvrckpt"
end if
else
if not soundbusy(1) then
sound stop 2
puppetsound 1, "qtvrckpt"
end if
end if
end
on initObjects
global menuController,cockpitController
set menuController = new (script "menuController")
if not (the movie = "bjs.dir" or the movie = "cs.dir" or the movie = "bombinc.dir") then
set cockpitController = new (script "cockpitController")
end if
end
on skipVideo
oxiStop(sprite 31)
initObjects
go to "start"
end
on viewCockpitDetail
global cockpitRetFrame
set cockpitRetFrame = the frame
puppetsprite 10, false
set the visible of sprite 110 = FALSE
sound stop 1
go to "cockpit_detail"
cursor -1
puppetsound 3, "mouse5"
end